<!--
登录界面
@author pan
@createDate 2022/02 2022/2/26 16:08
-->
<script setup lang="ts">
import { useLogin } from '@/hooks/LoginHook'

const { loading, onSubmit, elFormRef, loginFormRule, loginFormData } =
  useLogin()
</script>

<template>
  <div>
    <el-form ref="elFormRef" :model="loginFormData" :rules="loginFormRule">
      <el-form-item label="账号" prop="username">
        <el-input v-model="loginFormData.username"></el-input>
      </el-form-item>
      <el-form-item label="密码" prop="pwd">
        <el-input v-model="loginFormData.pwd" type="password"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" :loading="loading" @click="onSubmit">
          登录
        </el-button>
        <el-button>重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<style lang="scss" scoped></style>
